Skip to content

Fix four out-of-bounds defects in the Query serializer - #1343

Merged
adwsingh merged 1 commit into
mainfrom
adwsingh/query-buffer-bounds-fixes
Aug 31, 2026
Merged

Fix four out-of-bounds defects in the Query serializer#1343
adwsingh merged 1 commit into
mainfrom
adwsingh/query-buffer-bounds-fixes

Conversation

@adwsingh

Copy link
Copy Markdown
Contributor

What behavior changes?

AWS Query and EC2 Query serialization now:

  • Safely handles long Unicode strings and arbitrary-length BigInteger values.
  • Preserves outer indexes when serializing nested lists and maps.
  • Returns request bodies that are not corrupted when the pooled serializer is reused.
  • Avoids re-encoding ASCII prefixes in mixed Unicode strings.
  • Transfers oversized buffers instead of copying them before discarding the pooled buffer.

Why is this change needed?

The serializer had several buffer-bound and shared-state defects that could cause out-of-bounds writes, incorrect collection indexes, or request-body corruption. The change also reduces CPU and allocation overhead for large and mixed-Unicode values.

How was this validated?

Integration tests and benchmarks.

What should reviewers focus on?

Point reviewers to the files or sections that contain the interesting logic.

Additional Links

Related issues, design docs, or prior art.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@adwsingh
adwsingh requested a review from mtdowling August 30, 2026 05:36
@adwsingh
adwsingh merged commit e455648 into main Aug 31, 2026
5 checks passed
@adwsingh
adwsingh deleted the adwsingh/query-buffer-bounds-fixes branch August 31, 2026 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants